<?php
class OrderAction extends CommonAction {
	public function index() {
		$Order = M ( 'Order' );
		$User = M ( 'User' );
		import ( 'ORG.Util.Page' );
		$totalRows = $Order->count ();
		$Page = new Page ( $totalRows, $this->listRows );
		$orderList = $Order->limit ( $Page->firstRow . ',' . $Page->listRows )->order ( 'order_create_time desc' )->select ();
		foreach ( $orderList as $key => $value ) {
			$orderList [$key] ['user_email'] = $User->getFieldByUserId ( $value ['user_id'], 'user_email' );
		}
		$this->assign ( 'pageShow', $Page->show () );
		$this->assign ( 'orderList', $orderList );
		$this->display ();
	}
}